.TH "src/ho_bitmap.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*-
.ad l
.nh
.SH NAME
src/ho_bitmap.h \- libhocr C language header. 
.SH SYNOPSIS
.br
.PP
.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBho_bitmap\fP"
.br
.RI "\fIlibhocr bitmap struct \fP"
.in -1c
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBHO_BITMAP_H\fP   1"
.br
.ti -1c
.RI "#define \fBho_bitmap_get\fP(m, x, y)   (((((m)->data[(x) / 8 + (y) * (m)->rowstride]) & (0x80 >> ((x) % 8))) > 0)?1:0)"
.br
.ti -1c
.RI "#define \fBho_bitmap_set\fP(m, x, y)   (((m)->data[(x) / 8 + (y) * (m)->rowstride]) |= (0x80 >> ((x) % 8)))"
.br
.ti -1c
.RI "#define \fBho_bitmap_unset\fP(m, x, y)   (((m)->data[(x) / 8 + (y) * (m)->rowstride]) &= ~(0x80 >> ((x) % 8)))"
.br
.ti -1c
.RI "#define \fBho_bitmap_get_x\fP(m)   ((m)->x)"
.br
.ti -1c
.RI "#define \fBho_bitmap_get_y\fP(m)   ((m)->y)"
.br
.ti -1c
.RI "#define \fBho_bitmap_set_x\fP(m, new_x)   ((m)->x=(new_x))"
.br
.ti -1c
.RI "#define \fBho_bitmap_set_y\fP(m, new_y)   ((m)->y=(new_y))"
.br
.ti -1c
.RI "#define \fBho_bitmap_get_width\fP(m)   ((m)->width)"
.br
.ti -1c
.RI "#define \fBho_bitmap_get_height\fP(m)   ((m)->height)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_new\fP (const int width, const int height)"
.br
.ti -1c
.RI "int \fBho_bitmap_free\fP (\fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_clone\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_clone_window\fP (const \fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)"
.br
.ti -1c
.RI "int \fBho_bitmap_and\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)"
.br
.ti -1c
.RI "int \fBho_bitmap_or\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)"
.br
.ti -1c
.RI "int \fBho_bitmap_xor\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)"
.br
.ti -1c
.RI "int \fBho_bitmap_andnot\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)"
.br
.ti -1c
.RI "int \fBho_bitmap_copy\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_not\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_dilation_n\fP (const \fBho_bitmap\fP *m, const unsigned char n)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_erosion_n\fP (const \fBho_bitmap\fP *m, const unsigned char n)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_set_height\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_set_height_from_bottom\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_dilation\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_erosion\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_opening\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_closing\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_hlink\fP (const \fBho_bitmap\fP *m, const int size)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_herode\fP (const \fBho_bitmap\fP *m, const int size)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_vlink\fP (const \fBho_bitmap\fP *m, const int size)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_edge\fP (const \fBho_bitmap\fP *m, const int n)"
.br
.ti -1c
.RI "double \fBho_bitmap_get_fill\fP (const \fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_hlink\fP (\fBho_bitmap\fP *m, int size, int max_height)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_by_size\fP (const \fBho_bitmap\fP *m, int min_height, int max_height, int min_width, int max_width)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_boxes\fP (const \fBho_bitmap\fP *m, const int leeway_down, const int leeway_up)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_fill\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_set_height\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_set_height_from_bottom\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_obj_extend_lateraly\fP (const \fBho_bitmap\fP *m, const int ext_width)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_filter_remove_dots\fP (const \fBho_bitmap\fP *m, const unsigned char erosion_n, const unsigned char dilation_n)"
.br
.ti -1c
.RI "int \fBho_bitmap_filter_count_objects\fP (const \fBho_bitmap\fP *m)"
.br
.ti -1c
.RI "int \fBho_bitmap_draw_box\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)"
.br
.ti -1c
.RI "int \fBho_bitmap_draw_box_empty\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)"
.br
.ti -1c
.RI "int \fBho_bitmap_draw_vline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int height)"
.br
.ti -1c
.RI "int \fBho_bitmap_delete_vline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int height)"
.br
.ti -1c
.RI "int \fBho_bitmap_draw_hline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width)"
.br
.ti -1c
.RI "int \fBho_bitmap_delete_hline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_bitmap_rotate\fP (const \fBho_bitmap\fP *m, const double angle)"
.br
.ti -1c
.RI "int \fBho_bitmap_pnm_save\fP (const \fBho_bitmap\fP *m, const char *filename)"
.br
.ti -1c
.RI "int \fBho_bitmap_tiff_save\fP (const \fBho_bitmap\fP *m, const char *filename)"
.br
.in -1c
.SH "Detailed Description"
.PP 
libhocr C language header. 

libhocr - LIBrary for Hebrew Optical Character Recognition 
.SH "Define Documentation"
.PP 
.SS "#define HO_BITMAP_H   1"
.PP
.SS "#define ho_bitmap_get(m, x, y)   (((((m)->data[(x) / 8 + (y) * (m)->rowstride]) & (0x80 >> ((x) % 8))) > 0)?1:0)"
.PP
.SS "#define ho_bitmap_set(m, x, y)   (((m)->data[(x) / 8 + (y) * (m)->rowstride]) |= (0x80 >> ((x) % 8)))"
.PP
.SS "#define ho_bitmap_unset(m, x, y)   (((m)->data[(x) / 8 + (y) * (m)->rowstride]) &= ~(0x80 >> ((x) % 8)))"
.PP
.SS "#define ho_bitmap_get_x(m)   ((m)->x)"
.PP
.SS "#define ho_bitmap_get_y(m)   ((m)->y)"
.PP
.SS "#define ho_bitmap_set_x(m, new_x)   ((m)->x=(new_x))"
.PP
.SS "#define ho_bitmap_set_y(m, new_y)   ((m)->y=(new_y))"
.PP
.SS "#define ho_bitmap_get_width(m)   ((m)->width)"
.PP
.SS "#define ho_bitmap_get_height(m)   ((m)->height)"
.PP
.SH "Function Documentation"
.PP 
.SS "\fBho_bitmap\fP* ho_bitmap_new (const int width, const int height)"
.PP
new ho_bitamp
.PP
\fBParameters:\fP
.RS 4
\fIheight\fP hight of pixbuf in pixels 
.br
\fIwidth\fP width of pixbuf in pixels 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "int ho_bitmap_free (\fBho_bitmap\fP * m)"
.PP
free an \fBho_bitmap\fP
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.PP
Referenced by hocr::Hocr::do_bitmap_closing(), hocr::Hocr::do_bitmap_dilation(), hocr::Hocr::do_bitmap_erosion(), hocr::Hocr::do_bitmap_opening(), hocr::Hocr::do_image_processing(), hocr::Hocr::set_bitmap(), hocr::Hocr::set_pixbuf(), and hocr::Hocr::~Hocr().
.SS "\fBho_bitmap\fP* ho_bitmap_clone (const \fBho_bitmap\fP * m)"
.PP
copy a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to copy 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_clone_window (const \fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)"
.PP
copy a window from a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to copy 
.br
\fIx\fP x-start of window 
.br
\fIy\fP y-start of window 
.br
\fIwidth\fP width of window 
.br
\fIheight\fP height of window 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "int ho_bitmap_and (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)"
.PP
do bitwise and of two bitmaps
.PP
\fBParameters:\fP
.RS 4
\fIm_left\fP the left hand bitmap 
.br
\fIm_right\fP the right hand bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_or (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)"
.PP
do bitwise or of two bitmaps
.PP
\fBParameters:\fP
.RS 4
\fIm_left\fP the left hand bitmap 
.br
\fIm_right\fP the right hand bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_xor (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)"
.PP
do bitwise xor of two bitmaps
.PP
\fBParameters:\fP
.RS 4
\fIm_left\fP the left hand bitmap 
.br
\fIm_right\fP the right hand bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_andnot (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)"
.PP
do bitwise and not of two bitmaps
.PP
\fBParameters:\fP
.RS 4
\fIm_left\fP the left hand bitmap 
.br
\fIm_right\fP the right hand bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_copy (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)"
.PP
do bitwise copy of two bitmaps
.PP
\fBParameters:\fP
.RS 4
\fIm_left\fP the left hand bitmap 
.br
\fIm_right\fP the right hand bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_not (const \fBho_bitmap\fP * m)"
.PP
do bitwise not of a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the left hand bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_dilation_n (const \fBho_bitmap\fP * m, const unsigned char n)"
.PP
dilation of a a bitmap with 3x3 box
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to dilate 
.br
\fIn\fP dilation constant 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_erosion_n (const \fBho_bitmap\fP * m, const unsigned char n)"
.PP
erosion of a a bitmap with 3x3 box
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to erode 
.br
\fIn\fP erosion constant 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_set_height (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)"
.PP
take only top height black pixels of bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to erode 
.br
\fIheight\fP the height to take 
.br
\fItop\fP space above black pixel included in new object 
.br
\fIbottom\fP space below black pixel included in new object 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_set_height_from_bottom (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)"
.PP
take only bottom height black pixels of bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to erode 
.br
\fIheight\fP the height to take 
.br
\fItop\fP space above black pixel included in new object 
.br
\fIbottom\fP space below black pixel included in new object 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_dilation (const \fBho_bitmap\fP * m)"
.PP
dilation of a a bitmap with 3x3 box
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to dilate 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.PP
Referenced by hocr::Hocr::do_bitmap_dilation().
.SS "\fBho_bitmap\fP* ho_bitmap_erosion (const \fBho_bitmap\fP * m)"
.PP
erosion of a a bitmap with 3x3 box
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to erode 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.PP
Referenced by hocr::Hocr::do_bitmap_erosion().
.SS "\fBho_bitmap\fP* ho_bitmap_opening (const \fBho_bitmap\fP * m)"
.PP
opening of a a bitmap with 3x3 box
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to open 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.PP
Referenced by hocr::Hocr::do_bitmap_opening().
.SS "\fBho_bitmap\fP* ho_bitmap_closing (const \fBho_bitmap\fP * m)"
.PP
closing of a a bitmap with 3x3 box
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to close 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.PP
Referenced by hocr::Hocr::do_bitmap_closing().
.SS "\fBho_bitmap\fP* ho_bitmap_hlink (const \fBho_bitmap\fP * m, const int size)"
.PP
horizontaly link black dots in a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to horizontaly link 
.br
\fIsize\fP maximum distance 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_herode (const \fBho_bitmap\fP * m, const int size)"
.PP
horizontaly erode black dots in a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to horizontaly link 
.br
\fIsize\fP maximum distance 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_vlink (const \fBho_bitmap\fP * m, const int size)"
.PP
verticaly link black dots in a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to verticaly link 
.br
\fIsize\fP maximum distance 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_edge (const \fBho_bitmap\fP * m, const int n)"
.PP
copy edges in bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIn\fP width of egde 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "double ho_bitmap_get_fill (const \fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)"
.PP
return the ratio fill/volume value of a rectangle in the bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIx\fP x of rectangel 
.br
\fIy\fP y of rectangel 
.br
\fIwidth\fP width of rectangel 
.br
\fIheight\fP height of rectangel 
.RE
.PP
\fBReturns:\fP
.RS 4
the ratio value 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_hlink (\fBho_bitmap\fP * m, int size, int max_height)"
.PP
horizontaly link short objects in a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to horizontaly link 
.br
\fIsize\fP maximum distance 
.br
\fImax_height\fP maximum hight of objects to link 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_by_size (const \fBho_bitmap\fP * m, int min_height, int max_height, int min_width, int max_width)"
.PP
copy objects from bitmap to bitmap by size
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fImin_height\fP only objects with this minimal height are copied 
.br
\fImax_height\fP only objects with this maximal height are copied 
.br
\fImin_width\fP only objects with this minimal width are copied 
.br
\fImax_width\fP only objects with this maximal width are copied 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_boxes (const \fBho_bitmap\fP * m, const int leeway_down, const int leeway_up)"
.PP
copy boxed objects from bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIleeway_down\fP space below object to be included in box 
.br
\fIleeway_up\fP space above object to be included in box 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_fill (const \fBho_bitmap\fP * m)"
.PP
copy filled objects from bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_set_height (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)"
.PP
take height top pixels from objects in bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIheight\fP of new objects 
.br
\fItop\fP space above black pixel included in new object 
.br
\fIbottom\fP space below black pixel included in new object 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_set_height_from_bottom (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)"
.PP
take height bottom pixels from objects in bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIheight\fP of new objects 
.br
\fItop\fP space above black pixel included in new object 
.br
\fIbottom\fP space below black pixel included in new object 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_obj_extend_lateraly (const \fBho_bitmap\fP * m, const int ext_width)"
.PP
take extend objects lateraly
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIext_width\fP width of lateral extention 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_filter_remove_dots (const \fBho_bitmap\fP * m, const unsigned char erosion_n, const unsigned char dilation_n)"
.PP
remove halftone dots from bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.br
\fIerosion_n\fP the erosion operator factor 
.br
\fIdilation_n\fP the dilation operator factor 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "int ho_bitmap_filter_count_objects (const \fBho_bitmap\fP * m)"
.PP
count the number of objects in a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_bitmap\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of objects in a bitmap 
.RE
.PP

.SS "int ho_bitmap_draw_box (\fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)"
.PP
draw a black box on bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to draw on 
.br
\fIx\fP x-start of box 
.br
\fIy\fP y-start of box 
.br
\fIwidth\fP width of box 
.br
\fIheight\fP height of box 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_draw_box_empty (\fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)"
.PP
draw a black empty box on bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to draw on 
.br
\fIx\fP x-start of box 
.br
\fIy\fP y-start of box 
.br
\fIwidth\fP width of box 
.br
\fIheight\fP height of box 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_draw_vline (\fBho_bitmap\fP * m, const int x, const int y, const int height)"
.PP
draw vertical line on bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to draw on 
.br
\fIx\fP x-start of line 
.br
\fIy\fP y-start of line 
.br
\fIheight\fP height of line 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_delete_vline (\fBho_bitmap\fP * m, const int x, const int y, const int height)"
.PP
delete vertical line on bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to draw on 
.br
\fIx\fP x-start of line 
.br
\fIy\fP y-start of line 
.br
\fIheight\fP height of line 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_draw_hline (\fBho_bitmap\fP * m, const int x, const int y, const int width)"
.PP
draw horizontal line on bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to draw on 
.br
\fIx\fP x-start of line 
.br
\fIy\fP y-start of line 
.br
\fIwidth\fP height of line 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_bitmap_delete_hline (\fBho_bitmap\fP * m, const int x, const int y, const int width)"
.PP
delete horizontal line on bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to draw on 
.br
\fIx\fP x-start of line 
.br
\fIy\fP y-start of line 
.br
\fIwidth\fP height of line 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_bitmap_rotate (const \fBho_bitmap\fP * m, const double angle)"
.PP
rotate a bitmap
.PP
\fBParameters:\fP
.RS 4
\fIm\fP the bitmap to rotate 
.br
\fIangle\fP the angle in deg. 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "int ho_bitmap_pnm_save (const \fBho_bitmap\fP * m, const char * filename)"
.PP
writes \fBho_bitmap\fP to pnm file
.PP
\fBParameters:\fP
.RS 4
\fIm\fP \fBho_bitmap\fP 1 bpp 
.br
\fIfilename\fP save as file name 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.PP
Referenced by hocr::Hocr::save_bitmap_as_pnm().
.SS "int ho_bitmap_tiff_save (const \fBho_bitmap\fP * m, const char * filename)"
.PP
writes \fBho_bitmap\fP to tiff file
.PP
\fBParameters:\fP
.RS 4
\fIm\fP \fBho_bitmap\fP 1 bpp 
.br
\fIfilename\fP save as file name 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.PP
Referenced by hocr::Hocr::save_bitmap_as_tiff().
.SH "Author"
.PP 
Generated automatically by Doxygen for libhocr from the source code.
